<ccl:CustomChromeWindow x:Class="MediaAssistant.Controls.Dialog.DialogView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ccl="clr-namespace:CustomChromeLibrary;assembly=CustomChromeLibrary"
        xmlns:shell="clr-namespace:Microsoft.Windows.Shell;assembly=Microsoft.Windows.Shell"
        Title="{Binding Title}"
        WindowStartupLocation="CenterScreen"
        ResizeMode="NoResize"
        SizeToContent="WidthAndHeight"
        Background="Transparent"
        AllowsTransparency="True"
        WindowStyle="None"
        ShowInTaskbar="False"
        
>
  <shell:WindowChrome.WindowChrome>
    <shell:WindowChrome
            ResizeBorderThickness="6"
            CaptionHeight="50"
            GlassFrameThickness="0">
    </shell:WindowChrome>
  </shell:WindowChrome.WindowChrome>

  <Grid>
    <Border BorderThickness="1" BorderBrush="#867B6C" CornerRadius="10,10,0,0">
      <DockPanel>
        <Grid DockPanel.Dock="Top">
          <Border Background="{StaticResource HeaderGradientBackground}" CornerRadius="10,10,0,0">
            <Grid>
              <Rectangle Height="35" Margin="10,0,10,0" VerticalAlignment="Top" HorizontalAlignment="Stretch" Fill="{StaticResource HeaderGradientBackground}">
              </Rectangle>
              <TextBlock Text="{Binding Title}" Foreground="#867B6C" HorizontalAlignment="Center" VerticalAlignment="Center" />
            </Grid>
          </Border>
        </Grid>
        <StackPanel DockPanel.Dock="Bottom" Background="{StaticResource LightBackground}">
          <ContentControl Margin="5" Content="{Binding ContentPresenter.View}"/>
          <StackPanel Margin="5,5,10,5" Orientation="Horizontal" HorizontalAlignment="Right" Visibility="{Binding DialogButtonVisibility}">
            <Button Command="{Binding DialogCommand}" CommandParameter="Cancel" Content="{Binding CancelButtonCaption}"  Margin="10"  MinWidth="80"/>
            <Button Command="{Binding DialogCommand}" CommandParameter="Ok" Content="{Binding OkButtonCaption}"  Margin="0,10" MinWidth="80" />
          </StackPanel>
        </StackPanel>

      </DockPanel>
    </Border>
    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ccl:CustomChromeWindow}}, Path=CaptionButtonMargin}">
      <ccl:MinimizeButton/>
      <ccl:CloseButton/>
    </StackPanel>
  </Grid>
</ccl:CustomChromeWindow>
